<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>


<script>
let div = document.createElement('div');
let h1 = document.createElement('h1');
let span = document.createElement('span');
h1.innerHTML = '我是标题'
span.innerText = "小米 su 7"
div.id = 'container'
h1.className = 'title'
span.setAttribute('price','20w');
div.appendChild( h1 )
div.appendChild( span )
document.body.appendChild( div )


// var a = [11,2,13,5,9,7,8]
// a.sort( (a,b)=> b-a);
// document.write( a ) 



// var b = [4,5] 
// //var c = a.concat(b);
// var c = [...a , ...b ];

// console.log( a );
// console.log( b );
// console.log( c );

// var a = ['temo','js','longgui','dema'] ;
// document.write( a );
// document.write('<br>'+  a.pop() );
// document.write('<br>'+ a );


// var ok  = a.join('-')
// console.log( ok );

// temo,js,longgui,dema
// temo-js-longgui-dema
</script> 
</body>
</html>